<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动-产品布局</title>
    <style>
        /*清除样式*/
        * {
            margin: 0;
            padding: 0
        }
        li {
            list-style: none;
        }
        .product {
            /*版心居中*/
            margin: 50px auto;
            width: 1226px;
            height: 628px;
            background-color: pink;
        }
        .product .left {
            /*浮动*/
            float: left;

            width: 234px;
            height: 628px;
            background-color: skyblue;

        }
        .right {
            /*浮动*/
            float: right;
            width: 978px;
            height: 628px;
            background-color: brown;
        }

        .right li {
            /*浮动*/
            float: left;
            width: 234px;
            height: 300px;
            background-color: orange;
            margin-right: 14px;
            margin-bottom: 14px;
        }
        /*第四个li和第八个li 去掉margin-right*/
        .right li:nth-child(4n) {
            margin-right: 0;
        }
    </style>
</head>
<body>
<div class="product">
    <div class="left">

    </div>
    <div class="right">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
            <li>6</li>
            <li>7</li>
            <li>8</li>
        </ul>
    </div>
</div>
</body>
</html>
